In [1]:
from itertools import count
for x in count(1):
digits = sorted(str(x))
if all(sorted(str(k*x)) == digits for k in [2,3,4,5,6]):
print(x)
break
x += 1
In [ ]: